import axios from 'axios'
import {appId, httptimeout} from '@/config/env'


/**
 * [description]
 * @param  {[type]} uri    [description]
 * @param  {[type]} method [description]
 * @param  {[type]} params [description]
 * @return {[type]}        [description]
 */
export const apiAsyncSnd2Coupon = async (uri, method, params) => {
  console.log("apiAsyncSnd2Coupon:", method, params);
  if (method === "get") {
    return axios.get(uri, {params});
  } else {
    return axios.post(uri, params);
  }
}

/**
 * []
 * @param  {[type]} params [description]
 * @return {[type]}      [description]
 */
export const apiGetUserCoupon = async (params) => {
  console.log("apiGetUserCoupon-params:", params);
  let uri = "/mc/coupon/foruser.do";
  return axios.post(uri, params);
}
